package cn.yunyichina.provider.base.utils;

import java.io.InputStream;
import java.util.*;

/**
 * Created by 15-AK on 2016/12/28.
 */
public class OrgCodeMap {
    public static  final Map<String ,String> hospitalCodeMap = new HashMap<String ,String>();
    private static final OrgCodeMap config = new OrgCodeMap();

    private OrgCodeMap() {

    }
    public static OrgCodeMap getConfig() {
        return config;
    }

    public void  initHttpConfig() throws Exception {
        InputStream is = OrgCodeMap.class.getClassLoader().getResourceAsStream("conf/hospitalcode.properties");
        Properties pro = new Properties();
        pro.load(is);

        Iterator it=pro.entrySet().iterator();
        while(it.hasNext()){
            Map.Entry entry=(Map.Entry)it.next();
            String key = (String)entry.getKey();
            String value = (String)entry.getValue();

            hospitalCodeMap.put(key,value);
        }
    }

    public static void  main(String args[])throws Exception{


        System.out.println(hospitalCodeMap.get("lczyy"));
    }

}